package com.jr.service.impl;

import com.jr.dao.IUsersDao;
import com.jr.dao.impl.UsersDaoImpl;
import com.jr.pojo.Users;
import com.jr.service.IUserService;

import java.util.ArrayList;

public class UserServiceImpl implements IUserService {

    IUsersDao iud = new UsersDaoImpl();

    @Override //根据 用户编码 查用户密码  没有就是0
    public String queryPwdByUserCode(String userCode) {
        ArrayList<Users> users = iud.selectAllByUserCode(userCode);
        return users.size()>0?users.get(0).getPassword():"0";
    }
}
